package com.example.mall.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.mall.util.CodeGenerateUtils;

import java.io.Serializable;

/**
 * <p>
 * 秒杀活动表
 * </p>
 *
 * @author whale
 * @since 2025-05-06
 */
@TableName("tb_seckill_activities")
public class SeckillActivities extends Model<SeckillActivities> {

    private static final long serialVersionUID = 1L;

    /**
     * 秒杀活动唯一标识
     */
    @TableId("activity_id")
    private Long activityId;
    /**
     * 秒杀活动名称
     */
    private String name;
    /**
     * 秒杀活动开始时间
     */
    @TableField("start_time")
    private Date startTime;
    /**
     * 秒杀活动结束时间
     */
    @TableField("end_time")
    private Date endTime;
    /**
     * 活动状态（0：未开始，1：进行中，2：已结束）
     */
    private Integer status;
    /**
     * 创建时间
     */
    @TableField("create_date")
    private Date createDate;
    /**
     * 更新时间
     */
    @TableField("update_date")
    private Date updateDate;


    public SeckillActivities() {
        this.activityId = Long.valueOf(CodeGenerateUtils.generateUniqueId());
    }
    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }


    @Override
    public String toString() {
        return "SeckillActivities{" +
        ", activityId=" + activityId +
        ", name=" + name +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", status=" + status +
        ", createDate=" + createDate +
        ", updateDate=" + updateDate +
        "}";
    }
}
